// import { useState } from 'react'
import { Suspense } from 'react'
import { useRoutes } from 'react-router-dom'
import { routes } from './router'
import {DotLoading} from "antd-mobile"
import ScrollToTop from'./views/details/scrollToTop'
const App = () => {
  return <div>
    <Suspense fallback={ <div >加载中<DotLoading /></div> }>
      <ScrollToTop>
      {
        useRoutes(routes)
      }
      </ScrollToTop>
      
    </Suspense>

  </div>
}
export default App